<script type="text/javascript">
$(function () {
	var url = '${contextPath}script/el/markTopic.js';
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){
			calcTotalPoints();
		}
	});
});
</script>
<#import "/freemarker/modeltype_entity.ftl" as mte>
<div class="panel panel-default">
<div class="panel-heading font-bold">${(ccr.ccn)!''}</div>
<div>
	<div>
		<ul id="tags" class="nav nav-tabs tabs-vertical">
			<#assign page = (trList?size / 10) />
			<#if (trList?size % 10 > 0)><#assign page = page + 1 /></#if>
			<#list 1..page as pa>
				<li<#if (pa == 1)> class="active"</#if>><a href="javascript:;" onclick="showPageDiv($(this),'${pa}'); return false;">第 ${pa} 页</a></li>
			</#list>
		</ul>
	</div>
	<div style="margin-top: 5px;">
		<span style="float: left;margin-left: 15px;"><button class="btn btn-xs btn-danger"   title="正确答案"><i class="icon-check"></i></button>&nbsp;正确答案</span>
		<span style="float: left;margin-left: 15px;"><button class="btn btn-xs btn-info"  title="学生选中的答案" ><i class="icon-check"></i></button>&nbsp;学生勾选的答案</span>
		<span style="float: left;margin: 5px 0px 0px 15px;" id="totalPoint">本次考试得分：</span>
		<button class="btn btn-xs btn-primary" onclick="javascript: $.fn.colorbox.close();" style="float: right;margin-left: 15px;">取消</button>
		<button class="btn btn-xs btn-primary" onclick="javascript: checkSaveMarkTopic_est();" style="float: right;margin-left: 15px;">批阅提交</button>
	</div>
</div>
<!-- 题目 -->
<div style="clear: both;">
	<form id="editMarkForm" method="post">
		<!-- 考试记录表信息 -->
		<input type="hidden" value="${info.code!''}" name="code"/>
		<input type="hidden" value="${info.examScore!0}" name="examScore" id="examScore"/>
		<input type="hidden" value="${info.cc!''}" name="cc"/>
		<input type="hidden" value="${info.clc!''}" name="clc"/>
		<input type="hidden" value="true" name="isMark"/>
		<div id="tagContent" class="tab-content " style="margin-top:0px;">
			<#list 1..page as pa>
			<table class="table table-bordered showDiv" id="tagContent${pa}" style="<#if (pa == 1)><#else>display: none;</#if>"  >
				<#assign i = 0 />
				<#list trList as p>
				<#if ((p_index >= ((pa - 1) * 10)) && (p_index < (pa * 10)))>
				<tr>
					<th colspan="3">
						第${p_index + 1}题 (<@mte.Problemtype s=false value=(p.topic.type) />) &nbsp;&nbsp;${p.topic.content}&nbsp;&nbsp;<span >(分值  ：${p.points!0}分) (得分：${p.point!0}分)<#if p.topic.type != 3><input type="hidden" value="${p.point!0}" class="point" /></#if> </span>
					</th>
				</tr>
				<#if (p.topic.type == 1) || p.topic.type == 2>
					<#list p.topic.itemList as pa>
					<tr>
						<td style="width:20px;text-align: center;">
						<#if pa.isRight>
							<button class="btn btn-xs btn-danger" onclick="onclickNull();return false;" title="正确答案">
								<i class="icon-check"></i>
							</button>
						</#if>
						</td>
						<td style="width:20px;">
						<#list p.arList as ar >
							<#if ar.answerCode == pa.code>
								<button class="btn btn-xs btn-info"  onclick="onclickNull();return false;" title="学生选中的答案">
									<i class="icon-check"></i>
								</button>
							</#if>
						</#list>
						</td>
						<td style="text-align: left;">
							${pa.answer}
						</td>
					</tr>
					</#list>
				<#elseif p.topic.type == 3>
					<#list p.topic.itemList as pa>
					<tr>
						<td style="color:red;" colspan="5">
							参考答案：${pa.answer}
							<br>得分：
							<input type="text" name="trList[${i}].point" value="${p.point}" class="form-control point inpupoin" style="width:50px"onblur="javascript:checkPointsGt($(this));return false;"/>
							<input type="hidden" value="${p.points!0}" class="points"/><br>
						 </td>
					</tr>
					<tr>
						<td style="color:blue" colspan="5">
							<input type="hidden" name="trList[${i}].code" value="${p.code}" />
						 	学生答案：<#list p.arList as ar ><#if ar.content != null >
							<textarea style="width:400px;" rows="4" disabled="disabled">${ar.content}</textarea></#if></#list>
						 </td>
					</tr>
					</#list>
				</#if>
				</#if>
				<#assign i = i + 1 />
				</#list>
			</table>
			</#list>
		</div>
	</form>
</div>
</div>